import request from '@/utils/request'
import axios from 'axios'
import qs from 'qs'

// 获取验证码
export function getCodeNum(data) {
    return request({
        url: '/v1/code',
        method: 'post',
        data
    })
}

// 注册
export function apply(data) {
    return axios({
        url: 'http://www.young1024.com:1717/v1/user/apply',
        method: 'post',
        headers: { 'content-type': 'application/x-www-form-urlencoded' },
        data: qs.stringify(data)
    })
}

// 注册-序列化
export function applys(data) {
    return axios.post('http://www.young1024.com:1717/v1/user/apply',
        qs.stringify(data)
    )
}
